import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

export const useUserStore = defineStore('user', () => {
  //用户ID
  const userId = ref('')
  //设置用户id
  const setUserId = (id: any) => (userId.value = id)
  return { userId, setUserId }
},
  {
    //持久化到本地
    persist: true
  })
